#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <iostream>

using namespace std;

class Solution {
public:
    vector<string> ret;

    vector<string> binaryTreePaths(TreeNode* root) {
        if (root == nullptr)
        {
            return ret;
        }
        string temp;
        dfs(root, temp);
        return ret;
    }

    void dfs(TreeNode* root, string temp)
    {
        if (root->left == nullptr && root->right == nullptr)
        {
            temp += to_string(root->val);
            ret.push_back(temp);
            return;
        }

        temp += to_string(root->val) + "->";

        if (root->left)
            dfs(root->left, temp);
        if (root->right)
            dfs(root->right, temp);

    }
};

int main()
{
	return 0;
}